<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?php echo $codevalue['value']?></title>
<link href="/css/base.css" type="text/css" rel="stylesheet" />
<link href="/css/manage.css" type="text/css" rel="stylesheet" />
<link href="/css/layout.css" type="text/css" rel="stylesheet" />
<script type="text/javascript" src="/js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="/js/jquery.default.js"></script>
<script type="text/javascript" src="/js/jquery.validate.js"></script>
<script type="text/javascript" src="/js/xiaodian.js"></script>
<!--[if ie]><link href="/css/ie.css" type="text/css" rel="stylesheet"><![endif]-->
<style>
.face_box li {
margin: 0 8px 0 0;
}
</style>
<script type="text/javascript">

</script>

</head>

<body>
   <?php $this->load->view('head');?>
    <div class="w100p mt25 mb25">
    	<div class="w903 mg clearfix">
        	<div class="layout_left">
            	<div class="box_s5">
                	<div class="b_head"></div>
                    <div class="content">
                    	<div class="c_pd_s1 ss_list">
                        	<div class="comment_title mb10">
                            	<ul class="list_sorts fr">
                                	<li>
                                    	<a href="<?php echo site_url('storelist/'.$codevalue['name'].'/'.$codevalue['code'].'?orderby=favorites')?>">勋章排序</a>
                                    </li>
                                    <li>
                                    	<a href="<?php echo site_url('storelist/'.$codevalue['name'].'/'.$codevalue['code'].'?orderby=loves')?>">喜爱排序</a>
                                    </li>
                                    <li class="last">
                                    	<a href="<?php echo site_url('storelist/'.$codevalue['name'].'/'.$codevalue['code'].'?orderby=createTime')?>">时间排序</a>
                                    </li>
                                </ul>
                            	<h1><?php echo $codevalue['value']?>[<?php echo $storelistCount?>]</h1>
                                <div class="clear"></div>
                            </div>
                            <!-- comment -->
                            <ul class="store_list">
                            	<?php foreach ($storelist as $store):?>
                                <li>
                                    <div class="lr_box">
                                        <div class="l_box">
                                            <a href="<?php echo site_url('store?id='.$store['id'])?>"><img src="<?php echo site_url($store['photo'])?>" width="82" height="82" class="block" /></a>
                                        </div>
                                        <div class="r_box">
                                            <a href="<?php echo site_url('store?id='.$store['id'])?>" class="title"><?php echo $store['name']?></a>
                                            <p class="address_c">
                                                地址：<?php echo $store['address']?>
                                            </p>
                                            <p class="address_e">
                                                Add：<?php echo $store['eaddress']?>
                                            </p>
                                            <div class="rela_nums">
                                                <div class="love_nums">
                                                    <i class="icon_heart"></i><span><b class="l_num"><?php echo $store['loves']?></b></span>
                                                </div>
                                                <span>[<?php echo $store['favorites']?>]<a href="#">个收藏</a></span>
                                                <span>[<?php echo $store['recommends']?>]<a href="#">个推荐</a></span>
                                                <span>[<?php echo $store['comments']?>]<a href="#">条评论</a></span>
                                                <span>类别：<?php echo $codevalue['value']?></span>
                                            </div>
                                        </div>
                                    </div>
                                </li>
                                <?php endforeach;?>
                                
                            </ul>
                            <!-- comment--end-->
                            
                            <div class=" seperate"></div>
                            
                            <!-- fanye -->
                            <div class="fanye mt10">
                            <?php echo $this->pagination->create_links()?>
                             </div>
                            <!-- fanye--end-->
                        </div>
                    </div>
                    <div class="b_foot"></div>
                </div>
            </div>
            <div class="layout_right">
            	<div class="mb10 lr_link">
                	<a href="javascript:###" id="add_store" class="def_btn_s16">添加小店<i class="ml10">Add a shop</i></a>
                    <div class="blank20"></div>
                    <a href="<?php echo site_url('storemain')?>" class=" txt_link">>>浏览全部小店类别</a>
                </div>
                
            </div>
            <div class="clear"></div>
        </div>
    </div>
    
   <?php $this->load->view('foot')?>
</body>
<script type="text/javascript">
	$("#add_store").click(function(){
		if(xiaodian.checkLogin()){
			window.location.href="<?php echo site_url('member/addstore');?>";
			
		}else{
			window.location.href="<?php echo site_url('member/tologin').'?gourl='.site_url('storelist/'.$codevalue['name'].'/'.$codevalue['code'])?>";
		}
	})
</script>
</html>
